package com.maegul.data.entities;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 * The persistent class for the media_items database table.
 * 
 */
@Entity
@Table(name="media_items")
public class MediaItem extends AbstractEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;
	
	private String name;

	private String description;

	private double price;

	@Column(name="thumb_src")
	private String thumbSrc;

	private String type;

	//bi-directional many-to-one association to MediaSource
	@OneToMany(mappedBy="mediaItemBean")
	private List<MediaSource> mediaSources;

    public MediaItem() {
    }

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public double getPrice() {
		return this.price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getThumbSrc() {
		return this.thumbSrc;
	}

	public void setThumbSrc(String thumbSrc) {
		this.thumbSrc = thumbSrc;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<MediaSource> getMediaSources() {
		return this.mediaSources;
	}

	public void setMediaSources(List<MediaSource> mediaSources) {
		this.mediaSources = mediaSources;
	}
	
}